/* Account.h
Michael Zahniser

Header file for the Account class, which stores an account that has
various flags set for it.
*/

#ifndef __GRINGOTTS_ACCOUNT_H__
#define __GRINGOTTS_ACCOUNT_H__

#include "AccountType.h"

#include <string>
#include <ostream>

using std::string;
using std::ostream;



class Account {
public:
    Account();

    Account &operator+=(double amount);
    Account &operator-=(double amount);

    double Balance() const;
    void Add(double amount);
    // Set the balance of this account to zero.
    void Clear();

    void SetType(AccountType accountType);
    AccountType Type() const;
    // Set account flags.
    void SetFlag(const string &flag, bool isSet = true);
    bool IsChecks() const;

    // Print this account's info.
    void PrintInfo(ostream &out) const;


private:
    double balance;
    AccountType type;
    bool isChecks;
};

#endif
